package com.dt76.smallloanbackendservice.controller.jh;

import com.dt76.smallloanbackendservice.pojo.jh.DataTemplate;
import com.dt76.smallloanbackendservice.service.jh.LoasituationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller

public class LoasituationController {

    private final LoasituationService loasituationService;

    @Autowired
    public LoasituationController(LoasituationService loasituationService) {
        this.loasituationService = loasituationService;
    }

    @RequestMapping("/jh/qryThenumberAll")
    @ResponseBody
    public Map<String,List<DataTemplate>> qryThenumberAll1(){
        List<DataTemplate> list1 = loasituationService.qryThenumberAll();
        List<DataTemplate> list2 = loasituationService.qryMoneyAll();
        List<DataTemplate> list3 = loasituationService.qryIdAll();
        Map<String, List<DataTemplate>> map = new HashMap<>();
        map.put("list1",list1);
        map.put("list2",list2);
        map.put("list3",list3);
        return  map;
    }
}
